package com.admin.bean;

import com.admin.service.ProvinceService;
import com.admin.util.BaseUtil;

public class AdminSpCpSearchBean {

	private int id;
	private int spid;
	private int cpid;
	private String cpname;
	private String spname;
	private String spcode;
	private String spcommand;
	private String spfenpeicommand;
	private String spfee;
	private String spisp;
	private String province;
	private int kouliang;//扣量比例
	private String spprovince;//sp支持省份
	private int spstatus;		//sp合作状态
	private String shildcity;
	private String second;
	
	
	
	public int getKouliang() {
		return kouliang;
	}
	public void setKouliang(int kouliang) {
		this.kouliang = kouliang;
	}
	public String getSecond() {
		return second;
	}
	public void setSecond(String second) {
		this.second = second;
	}
	public String getShildcity() {
		return shildcity;
	}
	public void setShildcity(String shildcity) {
		this.shildcity = shildcity;
	}
	public String getSpname() {
		return spname;
	}
	public void setSpname(String spname) {
		this.spname = spname;
	}
	public int getId() {
		return id;
	}
	public void setId(int id) {
		this.id = id;
	}
	public int getSpid() {
		return spid;
	}
	public void setSpid(int spid) {
		this.spid = spid;
	}
	public int getCpid() {
		return cpid;
	}
	public void setCpid(int cpid) {
		this.cpid = cpid;
	}
	public String getCpname() {
		return cpname;
	}
	public void setCpname(String cpname) {
		this.cpname = cpname;
	}
	public String getSpcode() {
		return spcode;
	}
	public void setSpcode(String spcode) {
		this.spcode = spcode;
	}
	public String getSpcommand() {
		return spcommand;
	}
	public void setSpcommand(String spcommand) {
		this.spcommand = spcommand;
	}
	public String getSpfenpeicommand() {
		return spfenpeicommand;
	}
	public void setSpfenpeicommand(String spfenpeicommand) {
		this.spfenpeicommand = spfenpeicommand;
	}
	public String getSpfee() {
		return spfee;
	}
	public void setSpfee(String spfee) {
		this.spfee = spfee;
	}
	public String getSpisp() {
		return spisp;
	}
	public void setSpisp(String spisp) {
		this.spisp = spisp;
	}
	public String getProvince(){
		String[] provinces = this.spprovince.split(",");
		
		StringBuilder sb = new StringBuilder();
		for (String string : provinces) {
			int provinceId = BaseUtil.stringToInt(string);
			sb.append(ProvinceService.getProvince(provinceId).getProvince());
			sb.append(";");
		}
		
		
		return sb.toString();
	}
	public void setProvince(String province) {
		this.province = province;
	}
	public String getSpprovince() {
		return spprovince;
	}
	public void setSpprovince(String spprovince) {
		this.spprovince = spprovince;
	}
	public int getSpstatus() {
		return spstatus;
	}
	public void setSpstatus(int spstatus) {
		this.spstatus = spstatus;
	}
	
	
	
	
}
